package ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.persistence.model;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name="SIMPLE_USER")
public class SimpleUser extends User {
	
	@ManyToMany
	@JoinTable(name="USER_DEVICES",
				joinColumns=@JoinColumn(name="user_id"),
				inverseJoinColumns=@JoinColumn(name="device_id"))
	private List<Device> devices;
	
	public void setDevices(List<Device> devices) {
		this.devices = devices;
	}
	
	public List<Device> getDevices() {
		return  devices;
	}

	
}
